﻿<local:BaseWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.Settings.BootLogoWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:LenovoLegionToolkit.WPF.Windows"
    xmlns:resources="clr-namespace:LenovoLegionToolkit.WPF.Resources"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="{x:Static resources:Resource.BootLogoWindow_Title}"
    Width="400"
    Height="250"
    MinWidth="400"
    MinHeight="250"
    MaxWidth="400"
    MaxHeight="250"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    ResizeMode="CanMinimize"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterOwner">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid
            Grid.Row="0"
            Height="24"
            Margin="12,8,12,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock
                Grid.Column="0"
                VerticalAlignment="Center"
                FontSize="12"
                IsHitTestVisible="False"
                Text="{x:Static resources:Resource.BootLogoWindow_Title}" />
        </Grid>

        <Grid Grid.Row="1" Margin="12,12,12,12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <TextBlock
                Grid.Row="0"
                Grid.Column="0"
                Text="{x:Static resources:Resource.BootLogoWindow_Status}" />

            <TextBlock
                x:Name="_defaultStatus"
                Grid.Row="0"
                Grid.Column="1"
                FontWeight="Medium"
                Text="{x:Static resources:Resource.BootLogoWindow_DefaultLogoSet}"
                TextAlignment="Right"
                Visibility="Collapsed" />

            <TextBlock
                x:Name="_customStatus"
                Grid.Row="0"
                Grid.Column="1"
                FontWeight="Medium"
                Text="{x:Static resources:Resource.BootLogoWindow_CustomLogoSet}"
                TextAlignment="Right"
                Visibility="Collapsed" />

            <TextBlock
                x:Name="_descriptionTextBlock"
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="0,24,0,0"
                Foreground="{DynamicResource TextFillColorSecondaryBrush}"
                TextWrapping="Wrap" />

            <TextBlock
                x:Name="_resultTextBlock"
                Grid.Row="2"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="0,24,0,0"
                FontWeight="Medium"
                TextAlignment="Center"
                TextWrapping="Wrap">
                <TextBlock.Style>
                    <Style TargetType="TextBlock">
                        <Setter Property="Foreground" Value="{DynamicResource SystemFillColorErrorBrush}" />
                        <Style.Triggers>
                            <Trigger Property="Text" Value="{x:Static resources:Resource.BootLogoWindow_SetCustomSuccess}">
                                <Setter Property="Foreground" Value="{DynamicResource SystemFillColorSuccessBrush}" />
                            </Trigger>
                            <Trigger Property="Text" Value="{x:Static resources:Resource.BootLogoWindow_SetDefaultSuccess}">
                                <Setter Property="Foreground" Value="{DynamicResource SystemFillColorSuccessBrush}" />
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </TextBlock.Style>
            </TextBlock>
        </Grid>

        <Grid Grid.Row="2" Margin="12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <wpfui:Button
                x:Name="_revertToDefaultButton"
                Grid.Column="1"
                MinWidth="100"
                Margin="8,0,0,0"
                Appearance="Primary"
                Click="RevertToDefaultButton_Click"
                Content="{x:Static resources:Resource.RevertToDefault}"
                Visibility="Collapsed" />

            <wpfui:Button
                x:Name="_customizeButton"
                Grid.Column="2"
                MinWidth="100"
                Margin="8,0,0,0"
                Appearance="Primary"
                Click="CustomizeButton_Click"
                Content="{x:Static resources:Resource.BootLogoWindow_Customize}"
                Visibility="Collapsed" />

            <wpfui:Button
                Grid.Column="3"
                MinWidth="100"
                Margin="8,0,0,0"
                Appearance="Secondary"
                Click="CloseButton_Click"
                Content="{x:Static resources:Resource.Close}" />
        </Grid>

    </Grid>
</local:BaseWindow>
